<?php
/* @var $this ImageController */
/* @var $model Image */
/* @var $form CActiveForm  */

$this->pageTitle = Yii::app()->name . ' - Đăng ảnh';
$this->breadcrumbs = array(
    'Đăng ảnh',
);
?>

<h1>Đăng ảnh</h1>

<div class="form">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'upload-form',
        'enableClientValidation' => true,
        'clientOptions' => array(
            'validateOnSubmit' => true,
        ),
        'htmlOptions' => array(
            'enctype' => 'multipart/form-data',
        ),
    ));
    ?>

    <p class="note">Fields with <span class="required">*</span> are required.</p>

    <div class="row">
        <?php echo $form->labelEx($model, 'title'); ?>
        <?php echo $form->textField($model, 'title'); ?>
        <?php echo $form->error($model, 'title'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'img_url'); ?>
        <?php echo $form->fileField($model, 'img_url'); ?>
        <?php echo $form->error($model, 'img_url'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton('Đăng ảnh'); ?>
    </div>

    <?php $this->endWidget(); ?>
</div><!-- form -->
